package com.yuou.common.base;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.yuou.common.utils.ShiroUtils;
import com.yuou.model.Bloger;

public abstract class BlogerBaseController {
	protected Logger log = LoggerFactory.getLogger(this.getClass());

    public Bloger getBloger() {
        return ShiroUtils.getSysUser();
    }

    public Integer getUserId() {
        return getBloger().getId();
    }

    public static Subject getSubjct() {
        return SecurityUtils.getSubject();
    }

    public String getUsername() {
        return getBloger().getUsername();
    }
}
